/**
 * 业务接口服务
 */
import common from './common'
import paths from './paths'

const businessService = {};

(function (service) {
  /**
   * 获取业务信息
   */
  service.getBusinessById = (businessId) => {
    return common.get(paths.business.getBusinessById, {businessId: businessId})
  };
  service.getListBusinessAll = () => {
    return common.get(paths.business.getListBusinessAll, {})
  }
  service.getDataObject = (dataModelId) => {
    return common.get(paths.business.getDataObject, {dataModelId:dataModelId})
  }
  service.getDataObjectDetail = (dataObjectId) => {
    return common.get(paths.business.getDataObjectDetail, {dataObjectId:dataObjectId})
  }

  service.getBusinessMaterialById = (businessId) => {
    return common.get(paths.material.getBusinessMaterialById, {businessId: businessId})
  }

  service.getBusinessMaterialDetail = (categoryId) => {
    return common.get(paths.material.getBusinessMaterialDetail, {id : categoryId})
  }

  service.getInvestmentMaterialByItemCode = (itemCode) => {
    return common.get(paths.project.getInvestmentMaterialByItemCode, {itemCode: itemCode})
  }

  service.getInvestmentMaterialByItemCodeSource = (itemCode, source) =>{
    return common.get(paths.project.getInvestmentMaterialByItemCodeSource,{itemCode : itemCode , source : source})
  }

})(businessService)

export default businessService
